@extends('admin.main')
@section('head')
    <style>
        body {
            padding: 0;
        }
        .tdname {
            padding-left: 4px;
            padding-right: 4px;
        }
        .tdval {
            text-align: right;
            padding-right: 4px;
            color: #404040;
        }
        .tdval1 {
            text-align: center;
            color: #aaa;
        }
        .tdval2 {
            text-align: right;
            color: #404040;
        }
        .tdmin {
            text-align: center;
        }
        .tdinput {
            text-align: right;
            background-color: lightgoldenrodyellow;
            width: 96%;
            border:0px;
            text-align: right;
            color: red;
        }

    </style>
@endsection
@section('body')
    <div class="tab-wrap">
        <div class="tab-content">
            <form action="" method="post" class="form-horizontal">
                    <table border="1" cellspacing="4" cellpadding="4" bgcolor="#d3d3d3" width="100%">
                        <th colspan="4" style="background-color: grey;color: white">电子押金条 ( 原始凭证 ) </th>
                        <tr>
                            <td class="tdname">店铺名称</td>
                            <td colspan="3" class="tdval">{{$shop['shop_name']}}</td>
                        </tr>
                        <tr>
                            <td class="tdname">客户名称</td>
                            <td colspan="3" class="tdval">{{$member['name']}}</td>
                        </tr>
                        <tr>
                            <td class="tdname">客户电话</td>
                            <td colspan="3" class="tdval">{{$member['mobile']}}</td>
                        </tr>
                        <tr>
                            <td class="tdname">客户地址</td>
                            <td colspan="3" class="tdval">{{$member['address']}}</td>
                        </tr>
                        {{--<tr>--}}
                            {{--<td class="tdname">水桶丢损赔付</td>--}}
                            {{--<td colspan="3">--}}
                                {{--<div style="float: right">--}}
                                    {{--<span style="color: red;">{{isset($info['lose_pay']) ? $info['lose_pay'] : ''}} </span><span style="color: green;margin-right: 4px;">元/个</span>--}}
                                {{--</div>--}}

                            {{--</td>--}}
                        {{--</tr>--}}
                        <tr>
                            <td class="tdname">自备桶</td>
                            <td style="width: 30%;">
                                <div style="float: right">
                                    <span style="color: blue;">{{isset($info['self_bucket']) ? $info['self_bucket'] : ''}} </span><span style="color: green;margin-right: 4px;">个</span>
                                </div>
                            </td>
                            <td class="tdmin">品牌</td>
                            <td class="tdval1" >
                                @if(count($bucketData))
                                    @foreach($bucketData as $v)
                                        @if(isset($info) && $info['self_bucket_category'] == $v['bucket_category_id'])
                                            <span style="color: #404040">{{$v['category']['title']}}</span>
                                        @endif
                                    @endforeach
                                @endif
                            </td>
                        </tr>
                        <tr>
                            <td class="tdname">押金桶</td>
                            <td style="width: 30%;">
                                <div style="float: right">
                                    <span style="color: blue;">{{isset($info['cash_bucket']) ? $info['cash_bucket'] : ''}} </span><span style="color: green;margin-right: 4px;">个</span>
                                </div>
                            </td>
                            <td class="tdmin">品牌</td>
                            <td class="tdval1" >
                                @if(count($bucketData))
                                    @foreach($bucketData as $v)
                                        @if(isset($info) && $info['cash_bucket'] == $v['bucket_category_id'])
                                            <span style="color: #404040">{{$v['category']['title']}}</span>
                                        @endif
                                    @endforeach
                                @endif
                            </td>
                        </tr>
                        {{--<tr>--}}
                            {{--<td class="tdname">应回桶</td>--}}
                            {{--<td colspan="3" class="tdval"><span style="color: blue">--}}
                                    {{--{{ $member['initial_bucket_num'] +  $member['self_bucket_num']+ $member['total_bucket_num'] - $member['total_back_bucket_num'] - $member['self_bucket_num']}}--}}
                                {{--</span> <span style="color: green;">个</span></td>--}}
                        {{--</tr>--}}
                        {{--<tr>--}}
                            {{--<td class="tdname">应收饮水机</td>--}}
                            {{--<td colspan="3" class="tdval"><span style="color: blue">{{$info['water_dispenser']}}</span> <span style="color: green;">台</span></td>--}}
                        {{--</tr>--}}
                        <tr>
                            <td class="tdname">收水桶押金</td>
                            <td colspan="3" class="tdval"><span style="color: red">{{$info['cash']}}</span> <span style="color: green;">元</span></td>
                        </tr>
                        {{--<tr>--}}
                            {{--<td class="tdname">应退饮水机押金</td>--}}
                            {{--<td colspan="3" class="tdval"><span style="color: red">{{$info['water_dispenser_cash']}}</span> <span style="color: green;">元</span></td>--}}
                        {{--</tr>--}}
                        <tr>
                            <td class="tdname">备注：</td>
                            <td colspan="3" class="tdval2" style="text-align: center">
                                <span >{{$info['description']}}</span>
                            </td>
                        </tr>
                        <tr></tr>
                    </table>
                    <table border="1" cellspacing="4" cellpadding="4" width="100%">
                        <th colspan="4" style="background-color: orange;">退还押金</th>
                        <tr>
                            <td class="tdname">实退自备桶</td>
                            <td >
                                <input type="text" name="back_self_bucket_num" class="tdinput" style="width: 90%;color: blue"
                                       value="{{$info['back_self_bucket_num']}}" readonly><span style="color: green;margin-left: 2px;">个 </span>
                            </td>
                            <td class="tdmin">品牌</td>
                            <td class="tdval1" >
                                @if(count($bucketData))
                                    @foreach($bucketData as $v)
                                        @if(isset($info) && $info['back_self_bucket_category'] == $v['bucket_category_id'])
                                            <span style="color: #404040">{{$v['category']['title']}}</span>
                                        @endif
                                    @endforeach
                                @endif
                            </td>
                        </tr>
                        <tr>
                            <td class="tdname">实退押金桶</td>
                            <td >
                                <input type="text" name="back_cash_bucket_num" class="tdinput" style="width: 90%;color: blue"
                                       value="{{$info['back_cash_bucket_num']}}" readonly><span style="color: green;margin-left: 2px;">个 </span>
                            </td>
                            <td class="tdmin">品牌</td>
                            <td class="tdval1" >
                                @if(count($bucketData))
                                    @foreach($bucketData as $v)
                                        @if(isset($info) && $info['back_cash_bucket_category'] == $v['bucket_category_id'])
                                            <span style="color: #404040">{{$v['category']['title']}}</span>
                                        @endif
                                    @endforeach
                                @endif
                            </td>
                        </tr>
                        {{--<tr>--}}
                            {{--<td class="tdname">实回桶</td>--}}
                            {{--<td colspan="3">--}}
                                {{--<input type="text" name="back_bucket_num" class="tdinput" style="color: blue"--}}
                                       {{--value="">  <span style="color: green;margin-right: 4px;float: right">个</span>--}}
                            {{--</td>--}}
                        {{--</tr>--}}

                        {{--<tr>--}}
                            {{--<td class="tdname">实收饮水机</td>--}}
                            {{--<td colspan="3">--}}
                                {{--<input type="text" name="back_water_dispenser_num" class="tdinput" style="color: blue"--}}
                                       {{--value="">  <span style="color: green;margin-right: 4px;float: right">台</span>--}}
                            {{--</td>--}}
                        {{--</tr>--}}
                        <tr>
                            <td class="tdname">实退水桶押金</td>
                            <td colspan="3">
                                <input type="text" name="back_bucket_money" class="tdinput"
                                       value="{{$info['back_bucket_money']}}" readonly> <span style="color: green;margin-right: 4px;float: right">元</span>
                            </td>
                        </tr>
                        {{--<tr>--}}
                            {{--<td class="tdname">实退饮水机押金</td>--}}
                            {{--<td colspan="3">--}}
                                {{--<input type="text" name="back_water_dispenser_money" class="tdinput"--}}
                                       {{--value=""> <span style="color: green;margin-right: 4px;float: right">元</span>--}}
                            {{--</td>--}}
                        {{--</tr>--}}
                        <tr>
                            <td class="tdname">备注：</td>
                            <td colspan="3">
                                <input type="text" name="back_description" class="tdinput" style="width: 100%;text-align: center;color: grey" readonly value="{{$info['back_description']}}">
                            </td>
                        </tr>
                    </table>
            </form>
        </div>
    </div>
@endsection
